#ifndef Color_h
#define Color_h
#include <iostream>
using namespace std;

class Color
{
private:
	float r,g,b;
public:
	void setR(float a){if(!(a>=0 && a<=1)){ cout<<" valeur incorect, r=0"; r=0;} else r=a;};
	void setG(float a){if(!(a>=0 && a<=1)){ cout<<"valeur incorect, g=0"; g=0;} else g=a;};
	void setB(float a){if(!(a>=0 && a<=1)){ cout<<"valeur incorect, b=0"; b=0;} else b=a;};
	

	float getR() const {return r;};
	float getG() const {return g;};
	float getB() const {return b;};

	Color operator+(const Color &);
	Color operator+=(const Color &);
	Color operator-(const Color &);
	Color operator-=(const Color &);
	bool operator!=(const Color &);
	void div(const double &);
	Color() {r=0, b=0; g=0;}
	Color (float, float, float);
	Color (const Color &);
};
#endif

